<template>
<el-row>
  <el-col :span="24">
    <el-button size="mini" type="primary" round>新增事件任务</el-button>
  </el-col>
  <div class="data-wrapper"> 
   <template v-if="tableData!=null"> 
    <el-table :data="tableData" style="width: 100%"> 
     <el-table-column fixed="" prop="date" label="日期"> 
     </el-table-column> 
     <el-table-column prop="name" label="姓名"> 
     </el-table-column> 
     <el-table-column prop="province" label="省份"> 
     </el-table-column> 
     <el-table-column prop="city" label="市区"> 
     </el-table-column> 
     <el-table-column prop="address" label="地址" width="300"> 
     </el-table-column> 
     <el-table-column prop="zip" label="邮编"> 
     </el-table-column> 
     <el-table-column fixed="right" label="操作" width="100"> 
      <template slot-scope="scope">
        <el-button title="查看" size="small" icon="el-icon-search" type="primary" circle @click="handleView(scope.$index, scope.row)"></el-button>
        <el-button title="编辑" size="small" icon="el-icon-edit" type="success" circle @click="handleEdit(scope.$index, scope.row)"></el-button>
      </template>
     </el-table-column> 
    </el-table> 
   </template> 
  </div>
</el-row>  
</template>
<script>
export default {
  data() {
    return {
      activeName2: 'first',
       tableData: [{
          date: '2016-05-03',
          name: '王小虎',
          province: '上海',
          city: '普陀区',
          address: '上海市普陀区金沙江路 1518 弄',
          zip: 200333
        }, {
          date: '2016-05-02',
          name: '王小虎',
          province: '上海',
          city: '普陀区',
          address: '上海市普陀区金沙江路 1518 弄',
          zip: 200333
        }, {
          date: '2016-05-04',
          name: '王小虎',
          province: '上海',
          city: '普陀区',
          address: '上海市普陀区金沙江路 1518 弄',
          zip: 200333
        }, {
          date: '2016-05-01',
          name: '王小虎',
          province: '上海',
          city: '普陀区',
          address: '上海市普陀区金沙江路 1518 弄',
          zip: 200333
        }]
    };
  },
  methods: {
    handleClick(tab, event) {
      console.log(tab, event);
    }
  }
}
</script>
